﻿<UserControl x:Class="Reader.View.SearchBook"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="700" FontSize="14" Loaded="UserControl_Loaded" IsEnabled="{Binding}">
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" MinWidth="200" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TextBlock Width="45" HorizontalAlignment="Center" VerticalAlignment="Center">书名</TextBlock>
        <TextBox Name="textBox1" Width="200" Grid.Column="1" />
        <ComboBox Width="100"  HorizontalAlignment="Center" Name="comboBox1" Grid.Column="2">
            <ComboBoxItem Content="起点"  Tag="qidian.com" />
            <ComboBoxItem Content="理想文学" Tag="lxwxw.com"/>
            <ComboBoxItem Content="小说者" IsSelected="True" Tag="xiaoshuozhe.com"/>
        </ComboBox>
        <Button Content="搜索" HorizontalAlignment="Left" Name="button1" Width="75" Click="button1_Click" Grid.Column="3" />
        <ListBox ItemsSource="{Binding}" HorizontalAlignment="Center" Name="listBox1" VerticalAlignment="Center" Grid.ColumnSpan="4" Grid.Row="1">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <TextBlock FontSize="14" Text="{Binding Content}"></TextBlock>
                        <StackPanel Orientation="Horizontal">
                            <HyperlinkButton CommandParameter="{Binding Uri}" Tag="{Binding ViewName}" Content="{Binding Uri}" Click="HyperlinkButton_Click" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="14" />
                            <TextBlock FontSize="14" Width="80" Text="{Binding PageType}"></TextBlock>
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>
